// [2-36进制转换strtol]
// https://blog.csdn.net/weixin_43210754/article/details/121851933
// 2-35进制的两个数进行相减，大于10进制的用a-z（小写字母）补齐
//输入：2   11    1
//解释：2  为2进制， 11 为被减数   1 为减数
//输出：0 10
//解释：①0为正数，1为负数  ②11-1 =10

#include <bits/stdc++.h>
using namespace std;

#define DEBUG_
#ifdef DEBUG_
#define PF(...) printf(__VA_ARGS__)
#define FRE(x)                    \
  freopen("d:/oj/" #x ".in", "r", \
          stdin)  //,freopen("d:/oj/"#x".out","w",stdout)
#define FREC fclose(stdin), fclose(stdout);
#else
#define PF(...)
#define FRE(x)
#define FREC
#endif

// 46655 ->  zzz
// base = 36
string toBase(size_t val, size_t base) {
  //              012345678901234567890123456789012345
  string sBASE = "0123456789abcdefghijklmnopqrstuvwxyz";
  string sb;
  for (; val > 0; val /= base) {
    sb += sBASE[val % base];
  }
  std::reverse(sb.begin(), sb.end());
  return sb.size() > 0 ? sb : "0";
}

int main() {
  char *end = nullptr;
  int n = strtol("-zzz", &end, 36);
  printf("%d\n", n);
  string nOut = toBase(46655, 36);
  printf("-%s\n", nOut.c_str());
  return 0;
}
